/**
 * Hero项目登录模态框样式
 * 
 * 提供现代化、响应式的模态框样式
 * 支持深色主题和浅色主题
 */

/* 模态框基础样式 */
.hero-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: heroFadeIn 0.3s ease-out;
}

.hero-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: heroSlideIn 0.3s ease-out;
    overflow: hidden;
}

.hero-modal-small {
    max-width: 400px;
}

/* 模态框头部 */
.hero-modal-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-modal-close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0 5px;
}

.hero-modal-close:hover {
    color: white;
    transform: scale(1.1);
}

/* 模态框主体 */
.hero-modal-body {
    padding: 30px;
    background-color: #ffffff;
}

/* 表单样式 */
.hero-form-group {
    margin-bottom: 24px;
}

.hero-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.hero-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f9fafb;
    box-sizing: border-box;
}

.hero-form-group input:focus {
    outline: none;
    border-color: #2196F3;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hero-form-group input:invalid {
    border-color: #ef4444;
}

/* 按钮样式 */
.hero-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.hero-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.hero-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.hero-btn-secondary {
    background-color: #6b7280;
    color: white;
}

.hero-btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    transform: translateY(-1px);
}

.hero-btn-danger {
    background-color: #ef4444;
    color: white;
}

.hero-btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.hero-btn-link {
    background: none;
    color: #2196F3;
    border: none;
    text-decoration: underline;
    padding: 8px 12px;
    min-width: auto;
}

.hero-btn-link:hover {
    color: #1976D2;
    transform: none;
}

/* 表单操作区域 */
.hero-form-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* 消息提示样式 */
.hero-message {
    display: none;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.hero-message-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hero-message-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.hero-message-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* 动画效果 */
@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes heroSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-modal-content {
        width: 95%;
        margin: 10% auto;
        max-width: none;
    }
    
    .hero-modal-header {
        padding: 20px;
    }
    
    .hero-modal-header h2 {
        font-size: 20px;
    }
    
    .hero-modal-body {
        padding: 20px;
    }
    
    .hero-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-btn {
        width: 100%;
    }
    
    .hero-btn-link {
        width: auto;
    }
}

@media (max-width: 480px) {
    .hero-modal-content {
        margin: 5% auto;
    }
    
    .hero-modal-header {
        padding: 16px;
    }
    
    .hero-modal-body {
        padding: 16px;
    }
    
    .hero-form-group {
        margin-bottom: 20px;
    }
    
    .hero-form-actions {
        margin-top: 24px;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .hero-modal {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .hero-modal-content {
        background-color: #1f2937;
        color: white;
    }
    
    .hero-modal-body {
        background-color: #1f2937;
    }
    
    .hero-form-group label {
        color: #e5e7eb;
    }
    
    .hero-form-group input {
        background-color: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .hero-form-group input:focus {
        background-color: #4b5563;
        border-color: #2196F3;
    }
    
    .hero-btn-secondary {
        background-color: #4b5563;
    }
    
    .hero-btn-secondary:hover:not(:disabled) {
        background-color: #6b7280;
    }
    
    .hero-message-success {
        background-color: rgba(34, 197, 94, 0.1);
        color: #4ade80;
        border-color: rgba(34, 197, 94, 0.2);
    }
    
    .hero-message-error {
        background-color: rgba(239, 68, 68, 0.1);
        color: #f87171;
        border-color: rgba(239, 68, 68, 0.2);
    }
    
    .hero-message-info {
        background-color: rgba(59, 130, 246, 0.1);
        color: #60a5fa;
        border-color: rgba(59, 130, 246, 0.2);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .hero-modal-content {
        border: 2px solid #000;
    }
    
    .hero-form-group input {
        border-width: 2px;
    }
    
    .hero-btn {
        border: 2px solid transparent;
    }
    
    .hero-btn-primary {
        border-color: #000;
    }
}

/* 减少动画效果 */
@media (prefers-reduced-motion: reduce) {
    .hero-modal {
        animation: none;
    }
    
    .hero-modal-content {
        animation: none;
    }
    
    .hero-btn {
        transition: none;
    }
    
    .hero-btn:hover {
        transform: none;
    }
}

/* 打印样式 */
@media print {
    .hero-modal {
        display: none !important;
    }
}